//
//  MSWithDrawalCell.m
//  觅尚
//
//  Created by No.8 on 2019/4/1.
//  Copyright © 2019 No.8. All rights reserved.
//

#import "MSWithDrawalCell.h"

@implementation MSWithDrawalCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    MSWithDrawalCell * cell = [tableView dequeueReusableCellWithIdentifier:[MSWithDrawalCell ID]];
    cell = [[MSWithDrawalCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[MSWithDrawalCell ID]];
    cell.backgroundColor = [UIColor whiteColor];
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setMember];
        
    }
    return self;
}
- (void)setMember{
    /** 日期*/
    self.DateLabel = [[UILabel alloc] initWithFrame:CGRectMake(52 * px, 45 * px, ScreenWidth * 0.5, 60 * px)];
    self.DateLabel.textColor = [UIColor blackColor];
    self.DateLabel.text = @"2018.01.09";
    self.DateLabel.textAlignment = NSTextAlignmentLeft;
    self.DateLabel.font = [UIFont systemFontOfSize:SYRealValue(30 / 2)];
    [self addSubview:self.DateLabel];
    
    
    /** 日期*/
    self.IncomeLabel = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth - 52 * px) / 2, self.DateLabel.y, self.DateLabel.width, self.DateLabel.height)];
    self.IncomeLabel.textColor = [UIColor blackColor];
    self.IncomeLabel.text = @"300元";
    self.IncomeLabel.textAlignment = NSTextAlignmentRight;
    self.IncomeLabel.font = [UIFont systemFontOfSize:SYRealValue(30 / 2)];
    [self addSubview:self.IncomeLabel];
    
}

- (void)setWithdrawalModel:(MSWithdrawalModel *)WithdrawalModel{
    _WithdrawalModel = WithdrawalModel;
    self.DateLabel.text = [NSString stringWithFormat:@"%@",WithdrawalModel.formatTime];
    
    self.IncomeLabel.text = [NSString stringWithFormat:@"%@元",WithdrawalModel.withdrawMoney];
    
}
+(NSString *)ID{
    return @"cell";
}

@end
